import config from "../../config/config";
import ImageModel from "../../models/Image";
const imageModel = new ImageModel()

Component({
  properties: {},
  data: {
    search: '',
    back: ''
  },
  methods: {
    onBack(event) {
      // wx.navigateBack()
    },
    onSearch(event) {
      wx.navigateTo({
        url: '/sub_common/pages/search/index'
      })
    }
  },
  attached() {
    imageModel.getRemoteImage().then(data => {
      this.setData({
        search: config.app_base_url + data.search,
        back: config.app_base_url + data.back,
        bg: config.app_base_url + data.bg.search
      })
    })
  }
});
